package com.bestescortbedsystem.controller.log;

import com.bestescortbedsystem.service.LogService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("log")
public class LogController {
    @Resource
    private LogService logService;
    @RequestMapping("list")
    public Map<String,Object> logList(String pageNumber){
        Map<String,Object> map=new HashMap<>();
        Integer pageSize=10;
        try{
            map=logService.getAllLog(pageNumber,pageSize);
            map.put("result",true);
        }catch (Exception e){
            map.put("result",false);
        }finally {
            return map;
        }
    }
}
